package com.apikey.auth.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * API Key申请限制配置属性类
 * 用于配置浏览器指纹申请数量限制等保护性校验参数
 *
 * @author API Key Framework
 * @version 1.0
 */
@Component
@ConfigurationProperties(prefix = "apikey.framework")
public class ApplicationLimitProperties {

    /**
     * 单个浏览器指纹最大申请数量限制
     * 默认值为100
     */
    private int maxApplicationsPerFingerprint = 100;

    /**
     * 获取单个浏览器指纹最大申请数量限制
     *
     * @return 最大申请数量
     */
    public int getMaxApplicationsPerFingerprint() {
        return maxApplicationsPerFingerprint;
    }

    /**
     * 设置单个浏览器指纹最大申请数量限制
     *
     * @param maxApplicationsPerFingerprint 最大申请数量
     */
    public void setMaxApplicationsPerFingerprint(int maxApplicationsPerFingerprint) {
        this.maxApplicationsPerFingerprint = maxApplicationsPerFingerprint;
    }
}